package com.dtx.exercise.linkedlist;

public class LinkedListDemo {
    public static void main(String[] args) throws Exception {
        LinkedList<String> linkedList = new LinkedList<>();
        try {
            linkedList.output();
        } catch (Exception e) {
            e.printStackTrace();
        }
        linkedList.add("A");
        linkedList.add("B");
        linkedList.add("C");
        System.out.println("此时链表长度为"+linkedList.size());
        linkedList.output();
    }
}
